package cn.linran.pet.domain;

import java.math.BigDecimal;
import java.util.Date;
import cn.linran.basic.domain.BaseDomain;
import cn.linran.org.domain.Shop;
import cn.linran.user.domain.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 实体类：
 */
@Data
public class Pet extends BaseDomain {

    private String name;
    private BigDecimal costprice;
    private BigDecimal saleprice;
    /**
     * 类型id
     */
    private Long type_id;
    private PetType type;
    private String resources;//宠物图片保存路径
    /**
     * 状态：0下架 1上架
     */
    private Integer state;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GTM+8")
    private Date offsaletime = new Date();
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GTM+8")
    private Date onsaletime = new Date();
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GTM+8")
    private Date createtime = new Date();
    /**
     * 店铺Id 如果被领养店铺id为null
     */
    private Long shop_id;
    private Shop shop;
    /**
     * 如果被领养为领养用户id
     */
    private Long user_id;
    private User user;

    //寻主的id
    private Long search_master_msg_id;

    //宠物详情
    private PetDetail petDetail; //pet.id = petdetail.pet_id  当前pet的id存于petDetail中
}
